/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'
import ModuleLayout from '@/layout/module'

const uiRouter = {
  path: '/ui',
  component: Layout,
  redirect: '/ui/page/index',
  name: 'UI',
  meta: {
    title: 'UI',
    icon: 'ui',
    roles: ['admin', 'shop']
  },
  children: [
    {
      path: '/ui/page',
      component: ModuleLayout,
      name: 'UIPage',
      redirect: '/ui/page/index',
      meta: {
        title: '商城装修',
        icon: 'em-icon-layout'
      },
      children: [
        {
          path: '/ui/page/index',
          component: () => import('@/views/ui/page/index'),
          name: 'UIPageIndex',
          meta: {
            title: '布局页面'
          },
          hidden: true
        },
        {
          path: '/ui/page/update/:id',
          component: () => import('@/views/ui/page/update'),
          name: 'ui/page/update/:id',
          meta: {
            title: '页面设置'
          },
          hidden: true
        },
        {
          path: '/ui/page/tabs/:id',
          component: () => import('@/views/ui/page/tabs'),
          name: 'ui/page/tabs/:id',
          meta: {
            title: '布局页面选项卡'
          },
          hidden: true
        }
      ]
    },
    {
      path: '/ui/navbar',
      component: ModuleLayout,
      name: 'UINavbar',
      redirect: '/ui/navbar/sidebar',
      meta: {
        title: '功能导航',
        icon: 'em-icon-navbar'
      },
      children: [
        {
          path: '/ui/navbar/sidebar',
          component: () => import('@/views/ui/navbar/sidebar'),
          name: 'UINavbarSidebar',
          meta: {
            title: '侧边栏菜单'
          },
          hidden: true
        }
      ]
    },
    {
      path: '/ui/position',
      component: ModuleLayout,
      name: 'UIPosition',
      redirect: '/ui/position/index',
      meta: {
        title: '展位推荐',
        icon: 'em-icon-instagram'
      },
      children: [
        {
          path: '/ui/position/index',
          component: () => import('@/views/ui/position/index'),
          name: 'UIPositionIndex',
          meta: {
            title: '推荐位'
          },
          hidden: true
        },
        {
          path: '/ui/position/data/:id',
          component: () => import('@/views/ui/position/data'),
          name: 'ui/position/data/:id',
          meta: {
            title: '推荐内容'
          },
          hidden: true
        }
      ]
    },
    {
      path: '/ui/theme',
      component: ModuleLayout,
      name: 'UITheme',
      redirect: '/ui/theme/index',
      meta: {
        title: '主题管理',
        icon: 'em-icon-theme'
      },
      children: [
        {
          path: '/ui/theme/index',
          component: () => import('@/views/ui/theme/index'),
          name: 'UIThemeIndex',
          meta: {
            title: '风格样式'
          },
          hidden: true
        }
      ]
    },
    {
      path: '/ui/icons',
      component: ModuleLayout,
      name: 'UIIcons',
      redirect: '/ui/icons/index',
      meta: {
        title: '图标库',
        icon: 'em-icon-image-c'
      },
      children: [
        {
          path: '/ui/icons/index',
          component: () => import('@/views/ui/icons/index'),
          name: 'UIIconsIndex',
          meta: {
            title: '图标'
          },
          hidden: true
        }
      ]
    }
    // {
    //   path: '/ui/extend',
    //   component: ModuleLayout,
    //   name: 'UIExtend',
    //   redirect: '/ui/extend/index',
    //   meta: {
    //     title: '定制扩展',
    //     icon: 'em-icon-shape'
    //   },
    //   children: [
    //     {
    //       path: '/ui/extend/index',
    //       component: () => import('@/views/ui/extend/index'),
    //       name: 'UIExtendIndex',
    //       meta: {
    //         title: '块设置'
    //       },
    //       hidden: true
    //     },
    //     {
    //       path: '/ui/extend/mini',
    //       component: () => import('@/views/ui/extend/mini'),
    //       name: 'UIExtendMini',
    //       meta: {
    //         title: '微页面'
    //       },
    //       hidden: true
    //     },
    //     {
    //       path: '/ui/extend/footer',
    //       component: () => import('@/views/ui/extend/footer'),
    //       name: 'UIExtendFooter',
    //       meta: {
    //         title: '底部导航'
    //       },
    //       hidden: true
    //     }
    //   ]
    // }
  ]
}
export default uiRouter
